package cn.sz.tm.control;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import cn.sz.tm.pojo.StoreHouse;
import cn.sz.tm.service.StoreHouseService;

@Controller
@RequestMapping("/shc")
public class StoreHouseController {
	
	@Autowired
	private StoreHouseService shs;
	
	@RequestMapping(value="getcountbyid")
	public String getCountById(Integer bookid,Model model) {
		Integer count = shs.findCountByBookid(bookid);
		count--;
		model.addAttribute("count",count);
		return "store_count";
		
	}
	

}
